#pragma once

#include "stdafx.h"
class CGraphics
{
public:

	CGraphics(void);
	~CGraphics(void);
	void CreateDoubleBuffering(HWND hWnd);
	void FlipBuffers(BOOL clearScreen);
	void DisplayBitmap(HBITMAP hBitmap, int x, int y);
	void ClearPortionOfScreen(int color, RECT portion);
	void DisplayText(LPCWSTR szText, RECT *pRect, UINT flags);
	void TransparentBlit(HDC hdc, int destX, int destY, int destWidth, int destHeight, 
						      HDC hdc2, int srcX, int srcY, UINT transparency);
	void DisplayTransparentBitmap(HBITMAP hBitmap, int x, int y, UINT transparentColor);
	HBITMAP LoadBitmapFromResource(int resourceID, HINSTANCE hInstance);


private:
	HWND _hWnd;
 	RECT _scrnRect;				// This holds the client rectangle of the window
	HANDLE _hCompBitmap;			// This holds the compatible bitmap for the backbuffer
	HANDLE _hOldBitmap;			// This is used for storage to free when the program quits
	HDC _hdcFront;				// This is the front buffer (The part we see)
	HDC _hdcBack;				// This is the back buffer (the part we draw to, then flip)
	HDC _hdcBitmap;				// This is a temp buffer to swap the bitmap back and forth from

};
